home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase Pro v7.0 / DATA1.CAB / Sample_dBASE / Fleet / Fleetbar.prg < prev    next >
Encoding:
Text File  |  1997-11-20  |  1.9 KB  |  73 lines

  1. //------------------------------------------------------------------------
  2. //
  3. //  FleetBar.prg
  4. //
  5. //  Main toolbar for Fleet application. This toolbar is attached to
  6. //  the fleet form and provides a single click access to the Aircraft,
  7. //  Schedule and Fleet Tree forms.
  8. //
  9. //  Dependencies: AIRCRAFT.BMP
  10. //                TREE.BMP
  11. //                SCHEDULE.BMP             
  12. //
  13. //  Visual dBASE Samples Group
  14. //
  15. //  $Revision:   1.2  $
  16. //
  17. //  Copyright (c) 1997, Borland International, Inc. All rights reserved.    
  18. //
  19. //------------------------------------------------------------------------  
  20.  
  21. MSGBOX('This file contains the definition for the Fleet application toolbar. ' + ;
  22.        'Run "Fleet.prg" to see the toolbar.','Alert', 64)
  23.  
  24. class FleetToolbar( bLarge ) of Toolbar
  25.    this.flat := false
  26.    this.text := "Fleet"
  27.  
  28.    this.tAircraft = new Toolbutton(this)
  29.    with ( this.tAircraft ) 
  30.        bitmap  := "FILE AIRCRAFT.BMP"
  31.        onClick := class::tAircraft_onClick
  32.    endwith
  33.  
  34.  
  35.    this.tTree = new Toolbutton(this)
  36.    with ( this.tTree )  
  37.        bitmap  := "FILE TREE.BMP"
  38.        onClick := class::tTree_onClick
  39.    endwith
  40.  
  41.    this.tSchedule = new Toolbutton(this)
  42.    with ( this.tSchedule )  
  43.        bitmap  := "FILE SCHEDULE.BMP"
  44.        onClick := class::tSchedule_onClick
  45.    endwith
  46.  
  47.  
  48.    function tAircraft_onClick
  49.       local bOpen
  50.       bOpen = false
  51.       if TYPE("this.parent.form.app") == "O"
  52.          bOpen := this.parent.form.app.openAircraftForm()
  53.       endif
  54.    return ( bOpen )
  55.  
  56.    function tTree_onClick
  57.       local bOpen
  58.       bOpen = false
  59.       if TYPE("this.parent.form.app") == "O"
  60.          bOpen := this.parent.form.app.openFleetTreeForm()
  61.       endif
  62.    return ( bOpen )
  63.  
  64.    function tSchedule_onClick
  65.       local bOpen
  66.       bOpen = false
  67.       if TYPE("this.parent.form.app") == "O"
  68.          bOpen := this.parent.form.app.openScheduleForm()
  69.       endif
  70.    return ( bOpen )
  71.  
  72. endclass
  73.